<#include "/common/head.ftl">

<html>

<head>

<title>Birthday Report</title>

<style>
.center { text-align: center; }	
table.nameTable {
	empty-cells:show;
	border-top: 1px solid black;
	border-right: 1px solid black;
}

table.nameTable tr {
	
}

table.nameTable tr td {
	border-left: 1px solid black;
	border-bottom: 1px solid black;
	padding: 5px 2px;
}

</style>

</head>

<body style="padding:0cm">

<div style="width:27.5cm; text-align:left; margin:0; padding:0;">
<h1 style="text-align: center; padding-top:0cm; margin:0cm">Birthday Report</h1>
<br/>

<table class="nameTable" border="0" style="solid black;width:27cm; margin: auto;padding:0cm" cellspacing="0" cellpadding=0">
	<tr style="text-align:center;font-weight:bold;background-color:#C0C0C0">
		<td>No.</td>
		<td>Student</td>
		<td class="w100">Birthday</td>
		<td>Class</td>
		<td>Program</td>
		<td>Room</td>
		<td class="w100">Shift</td>
		<td class="w100">Start Date</td>
		<td class="w100">End Date</td>
		<td>Receipt</td>
	</tr>
	<#list students as student>
		<tr>
			<td class="center">${student_index + 1}</td>
			<td style="font-weight:bold">${student.fullName}</td>
			<td class="center" rowspan="${map(student).size()}">${(student.dateOfBirth?date)!}</td>
		<#list map(student) as receipt>
				<td>${(receipt.offering.name)!}</td>
				<td>${(receipt.offering.level.program.name)!}</td>
				<td class="center">${(receipt.offering.room.code)!}</td>
				<td class="center">${(receipt.offering.shift.startTime?time)!}-${(receipt.offering.shift.endTime?time)!}</td>
				<td class="center">${(receipt.offering.startDate?date)!}</td>
				<td class="center">${(receipt.offering.endDate?date)!}</td>
				<td class="center">${(receipt.number)!}</td>
		</tr>
		</#list>
	</#list>
</table>
</body>
</html>